export default {
  data() {
    return {
      list: [],//信息
      total: 0,//分页
      pageNo: 1,//页码
      pageSize: 10,//每一页展示的条数
      loading: true,//加载
      searchForm: {//表单
        id: "",
        name: "",
        status: "",
        category: "",
      },
    };
  },

  created() {
    this.getList();
  },

  methods: {
    // 每页展示的条数
    onSizeChange(size) {
      this.pageSize = size;
      this.pageNo = 1;
      this.getList();
    },
    // 页数
    onCurrentChange(page) {
      this.pageNo = page;
      this.getList();
    },
    //搜索
    onSearch(obj) {
      console.log(obj);
      this.searchForm = obj;
      this.pageNo = 1;
      this.getList();
    },
  },
};
